package com.dark.cms.base.dto;

import java.util.List;

/**
 * 分页类
 * @author Devil
 */
public class PageDTO extends BaseDTO {
	
	private int everyPage;  //每页条数
	
	private int totalPage; //总页数

	private long totalCount; //总条数
	
	private int currentPage; //当前页码
	
	private int beginIndex;  //开始条数
	
	private boolean hasNextPage; //是否有下一页
 
	private boolean hasPrePage;  //是否有下一页

	private List pageData;   //当前页数据
	
	public PageDTO() {};
	
	public PageDTO(int everyPage, int totalPage, int totalCount, int currentPage,
			int beginIndex, boolean hasNextPage, boolean hasPrePage, List pageData) {
		this(everyPage, totalPage, totalCount, currentPage, beginIndex, hasNextPage, hasPrePage);
		this.pageData = pageData;
	}
	
	public PageDTO(int everyPage, int totalPage, long totalCount, int currentPage,
			int beginIndex, boolean hasNextPage, boolean hasPrePage) {
		this.setEveryPage(everyPage);
		this.setTotalCount(totalCount);
		this.setTotalPage(totalPage);
		this.setCurrentPage(currentPage);
		this.setBeginIndex(beginIndex);
		this.setHasNextPage(hasNextPage);
		this.setHasPrePage(hasPrePage);
	}

	public int getBeginIndex() {
		return beginIndex;
	}

	public void setBeginIndex(int beginIndex) {
		this.beginIndex = beginIndex;
		this.put("beginIndex", beginIndex);
	}

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
		this.put("currentPage", currentPage);
	}

	public boolean isHasNextPage() {
		return hasNextPage;
	}

	public void setHasNextPage(boolean hasNextPage) {
		this.hasNextPage = hasNextPage;
		this.put("hasNextPage", hasNextPage);
	}

	public boolean isHasPrePage() {
		return hasPrePage;
	}

	public void setHasPrePage(boolean hasPrePage) {
		this.hasPrePage = hasPrePage;
		this.put("hasPrePage", hasPrePage);
	}

	public long getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(long totalCount) {
		this.totalCount = totalCount;
		this.put("totalCount", totalCount);
	}

	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
		this.put("totalPage", totalPage);
	}

	public int getEveryPage() {
		return everyPage;
	}

	public void setEveryPage(int everyPage) {
		this.everyPage = everyPage;
		this.put("everyPage", everyPage);
	}

	public List getPageData() {
		return pageData;
	}

	public void setPageData(List pageData) {
		this.pageData = pageData;
		this.put("pageData", pageData);
	}
}
